// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0


export component TestCase {

    public pure function issue4942(cond : bool) -> int {
        if (cond) {
            45
        }
        12
    }

    out property <bool> test: issue4942(true) == 12 && issue4942(false) == 12;
}


/*

FIXME:
error: unused parameter 'arg_0' [-Werror=unused-parameter]
inline auto TestCase::fn_issue4942 (bool arg_0) const -> int{
gcc-args: -Wno-unused-parameter

```cpp
auto handle = TestCase::create();
const TestCase &instance = *handle;
assert(instance.get_test());
```

```rust
let instance = TestCase::new().unwrap();
assert!(instance.get_test());
```

```js
var instance = new slint.TestCase({});
assert(instance.test);
```

*/
